import java.io.File;
import java.io.IOException;
import java.text.ParseException;
import java.util.ArrayList;
import java.util.List;

import etxt2db.api.ClassificationExecutor;
import etxt2db.api.ClassificationModel;
import etxt2db.api.ClassificationModelCreator;


public class TestHAREM {
	public static void main(String[] args) throws IOException, ParseException{
		ClassificationModelCreator trainer = new ClassificationModelCreator();
		
		List<String> types = new ArrayList<String>();
		types.add("ABSTRACCAO");
		types.add("ACONTECIMENTO");
		types.add("COISA");
		types.add("LOCAL");
		types.add("OBRA");
		types.add("ORGANIZACAO");
		types.add("PESSOA");
		types.add("TEMPO");
		types.add("VALOR");
		
		File trainingFile = new File("C:/Users/Goncalo/Desktop/CorpusHarem/treino");
		
		File testingFile = new File("C:/Users/Goncalo/Desktop/CorpusHarem/teste");
		
		ClassificationModel model = trainer.trainMachineLearningModel(trainingFile, 
				                                                      ClassificationModelCreator.MLTechnique.CRF, 
				                                                      types);
		
		ClassificationExecutor exec = new ClassificationExecutor();
		System.out.println(exec.getClassifiedString(testingFile, model, types));
	}
}
